import React from 'react'
import Popup from '@/components/common/Popup'
import TitleBlock from '@/components/common/TitleBlock'
import './index.scss'

const SuccessPopup = ({
  handleClose = () => {},
  decorator = <></>,
  context = <></>,
  title = '',
  withStar = false,
  status = false,
}) => {
  const Content = (
    <div className="success-popup__content">
      <TitleBlock withStar={withStar} title={title} />
      <div className="success-popup__context">{context}</div>
    </div>
  )

  return (
    <Popup
      status={status}
      needCloseBtn
      needMaskClose
      needStereoscopic
      decorate={decorator}
      content={Content}
      handleClose={handleClose}
    />
  )
}

export default SuccessPopup
